<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ include file="/includes/taglibs.jsp"%>
<html>
<head>
<title>汽车美容平台</title>
<style>
	.label
	{
		text-align: right;
		font-size: 9pt;
		font-family: monospace;
		filter:dropshadow(color=#d5d5d5,offx=1,offy=1);
		color:#000000;
		color: highlight;
		font-weight: bold;
		height:20;		
	}
	
	.text
	{
		border: 0px;
		background-color: transparent;
		width: 135px;
		height: 17px;
		margin: 1 0 1 25;
	}
	
	.select
	{
		border: 0px;
		background-color: transparent;
		width: 100%;
		height: 10px;
	}
</style>
<meta name="menu" content="login" />
</head>
<body style="padding: 0; margin: 0; filter:progid:DXImageTransform.Microsoft.gradient(enabled='enabled',startColorstr=#103560, endColorstr=#226cc5);">
<form action="org.gocom.bpm.platform.model.metadata.LoginManager.flow" method="post" name="loginForm" style="width:100%;height:100%;" onkeydown="if(event.keyCode==13)login();">

<table style="width: 100%; height: 100%;">
	<tr>
		<td align="center" valign="middle">
			<div style="width: 565; height: 294;">
				<div style="width: 565; height: 116; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_01.jpg');"></div>
				<div style="width: 565; height: 178;">
					<div style="width: 96; height: 178; float: left; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_02.jpg');"></div>
					<div style="width: 68; height: 178; float: left;">
						<table cellpadding="0" cellspacing="0" style="width: 68; height: 178;">
							<tr>
								<td style="width: 68; height: 21; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_03.jpg');" class="label">用户名：</td>
							</tr>
							<tr>
								<td style="width: 68; height: 13; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_07.jpg');"></td>
							</tr>
							<tr>
								<td style="width: 68; height: 21; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_09.jpg');" class="label">密码：</td>
							</tr>
							<tr>
								<td style="width: 68; height: 13; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_11.jpg');"></td>
							</tr>
							<tr>
								<td style="width: 68; height: 20; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_13.jpg');" class="label">项目号：</td>
							</tr>
							<tr>
								<td style="width: 68; height: 90; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_15.jpg');"></td>
							</tr>
						</table>
					</div>
					<div style="width: 13; height: 178; float: left; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_04.jpg');"></div>
					<div style="width: 165; height: 178; float: left;overflow:hidden;">
						<table cellpadding="0" cellspacing="0" style="width: 165; height: 178;">
							<tr>
								<td style="width: 165; height: 21; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_05.jpg');">
									<input type="text" class="text" name="userId" />
								</td>
							</tr>
							<tr>
								<td style="width: 165; height: 13; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_08.jpg');"></td>
							</tr>
							<tr>
								<td style="width: 165; height: 21; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_10.jpg');">
									<input type="password" class="text" name="password" />
								</td>
							</tr>
							<tr>
								<td style="width: 165; height: 13; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_12.jpg');"></td>
							</tr>
							<tr>
								<td style="width: 165; height: 20;" >
									<select name="projectNo">
										<option value="">请选择...</option>
									</select>	
								</td>
							</tr>
							<tr>
								<td style="font-size:9pt;color:red; width: 165; height: 90; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_16.jpg');">
								<%
								  Integer returnCode=(Integer)request.getAttribute("returnCode");
								  if(returnCode!=null && returnCode==-1){
								 %>
									登录失败:<%=request.getAttribute("returnMessage")%>
															   
								 <%} else if(returnCode!=null&&returnCode==-2){%>		
								 	用户名或密码错误！
								 <%} %>						
								</td>
							</tr>

						</table>
					</div>
					
					<div style="width: 223; height: 178; float: left; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_06.jpg');">
						<div style="width: 55; height: 178; float: left; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_06_01.jpg');"></div>
						<div style="width: 83; height: 178; float: left;">
							<table cellpadding="0" cellspacing="0" style="width: 83; height: 178;">
							<tr>
								<td style="width: 83; height: 82; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_06_02.jpg'); cursor: hand;" onclick="javascript:login();"></td>
							</tr>
							<tr>
								<td style="width: 83; height: 96; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_06_04.jpg');"></td>
							</tr>
						</table>
						</div>
						<div style="width: 85; height: 178; float: left; background-image: url('<%=request.getContextPath()%>/pages/image/login/login_06_03.jpg');"></div>
					</div>
				</div>
			</div>
		</td>
	</tr>
</table>
</form>
<script>
   function login(){
     var frm=$name("loginForm");
     if(checkForm(frm) && checkProjectInfo()){
       frm.submit();
     }
     
   }
   
   function checkProjectInfo(){
      if($name("projectNo").value!=""){
	      var myAjax=new Ajax("org.gocom.bpm.platform.model.metadata.LoginManager.checkProjectInfo.biz");
	      myAjax.addParam("projectNo",$name("projectNo").value);
	      
	      myAjax.submit("UTF-8");
	
		  var state = myAjax.getValues("/root/data/state");
		  if(state=="ONL"){
		     if(!confirm("项目编号 ["+$name("projectNo").value+ "]  已上线，是否需要修改上线?\n\n\r(提示:修改上线将重新生成新项目编码，如:项目编码_001)")){
		       return false;
		     }
		  }
	      
	      return true;
      }else{
          alert("请选择项目号！");
          $name("projectNo").focus();
      }
   }
</script>
</body>
</html>